//
//  TZL_NavigationController.m
//  MyTabbarDemo
//
//  Created by Yuki on 2021/10/11.
//

#import "TZL_NavigationController.h"

@interface TZL_NavigationController ()<UINavigationControllerDelegate>

@end

@implementation TZL_NavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
//    if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
//        self.interactivePopGestureRecognizer.enabled = NO;
//    }
    if (self.childViewControllers.count > 0) { // 如果push进来的不是第一个控制器
        // 隐藏tabbar
        viewController.hidesBottomBarWhenPushed = YES;
        
    }
    // 这句super的push要放在后面, 让viewController可以覆盖上面设置的leftBarButtonItem
    [super pushViewController:viewController animated:animated];
}



@end
